package product

// ProductAttrValue 商品属性值表
type ProductAttrValue struct {
	global.BaseModel
	ProductId int32 `json:"productId" gorm:"column=product_id;comment:商品ID"`

	Sku string `json:"sku" gorm:"column=sku;comment:商品属性sku"`

	Stock int32 `json:"stock" gorm:"column=stock;comment:属性对应的库存"`

	Sales int32 `json:"sales" gorm:"column=sales;comment:销量"`

	Price big.Float `json:"price" gorm:"column=price;comment:价格"`

	Image string `json:"image" gorm:"column=image;comment:图片"`

	Cost big.Float `json:"cost" gorm:"column=cost;comment:成本价"`

	BarCode string `json:"barCode" gorm:"column=bar_code;comment:商品条码"`

	OtPrice big.Float `json:"otPrice" gorm:"column=ot_price;comment:原价"`

	Weight big.Float `json:"weight" gorm:"column=weight;comment:重量"`

	Volume big.Float `json:"volume" gorm:"column=volume;comment:体积"`

	Brokerage int32 `json:"brokerage" gorm:"column=brokerage;comment:一级返佣"`

	BrokerageTwo int32 `json:"brokerageTwo" gorm:"column=brokerage_two;comment:二级返佣"`

	Type int32 `json:"type" gorm:"column=type;comment:商品类型 0=商品，1=秒杀，2=砍价，3=拼团, 4=视频号"`

	Quota int32 `json:"quota" gorm:"column=quota;comment:活动限购数量"`

	QuotaShow int32 `json:"quotaShow" gorm:"column=quota_show;comment:活动限购数量显示"`

	AttrValue string `json:"attrValue" gorm:"column=attr_value;comment:attr_values 创建更新时的属性对应"`

	Version int32 `json:"version" gorm:"column=version;comment:并发版本控制"`

	MasterId int32 `json:"masterId" gorm:"column=master_id;comment:主商品attrValueID"`

	IsCallback bool `json:"isCallback" gorm:"column=is_callback;comment:是否回滚库存：0-未回滚，1-已回滚"`
}
